From 69899542a2d26e6a1339beb214e288667b1a6791 Mon Sep 17 00:00:00 2001 From: oliskoli Date: Thu, 24 Nov 2005 02:11:57 +0000 Subject: [PATCH] Check if output file was opened before. --- ozi.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ozi.c b/ozi.c index b33d1f917..3e2c91990 100644 --- a/ozi.c +++ b/ozi.c @@ -310,8 +310,11 @@ wr_init(const char *fname) static void wr_deinit(void) { - fclose(file_out); - file_out = NULL; + if (file_out != NULL) { + + fclose(file_out); + file_out = NULL; + } ozi_ofname = NULL; mkshort_del_handle(&mkshort_handle); -- 2.30.2